/* Copyright (C) 2003-2016 Patrick G. Durand
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.plealog.genericapp.api;

import java.awt.*;

/**
 * Interface enabling to listen to application startup procedure.
 */
public interface EZUIStarterListener {

	/**
	 * 这个方法在应用程序启动过程的最开始被调用。
	 * 不能获取到frame，并且方法在主线程中调用
	 */
	void preStart();

	/**
	 * 当应用程序框架即将显示时，将调用此方法。
	 * 可以获取到frame，并且方法在事件分发线程中调用
	 */
	void postStart();

	/**
	 * 在显示应用程序框架时调用此方法。
	 * 方法在事件分发线程中调用
	 */
	void frameDisplayed();

	/**
	 * This method is called when application is going to install the user-defined
	 * component within the main frame.
	 */
	Component getApplicationComponent();

	/**
	 * This method is called whenthe application is about to quit.
	 *
	 * @return false to prevent application from terminating. Return true is application can exit.
	 */
	boolean isAboutToQuit();

}
